
// 站点配置文件
import __weConfig from '../config.js';

const server = (path) => {
  return __weConfig.baseUrl + (path.substring(0, 1) == '/' ? path : '/' + path)
}

const weapp = (path) => {
  return __weConfig.weappUrl + (path.substring(0, 1) == '/' ? path : '/' + path)
}

const getToken = () => {
  return 'Bearer ' + wx.getStorageSync('token')
}

// 微信认证 step1
const weauth = code => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/weauth'),
      data: {
        code: code
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 账号绑定 step2
const webind = (openid, username, password) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/webind'),
      data: {
        openid, username, password
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 解除绑定 step3
const weunbind = (openid, username, password) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/weunbind'),
      data: {
        openid, username, password
      },
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 微信快速登录
const welogin =  code => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/welogin'),
      data: {
        code: code
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 账号密码登录 （临时）
const tmplogin = (username, password) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/login'),
      data: {
        username, password
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 修改密码
const repasswd = (username, oldpassword, newpassword) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/repasswd'),
      data: {
        username, oldpassword, newpassword
      },
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 当前用户信息
const userinfo = () => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/userinfo'),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 当前用户各项指标统计信息
const usercount = () => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/usercount'),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 当前用户各项指标统计信息
const wgxcuser = (userName) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/wgxcuser'),
      header: {
        Authorization: getToken()
      },
      data: {
        userName: userName
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 当前用户消息列表
const messagelist = (status, pageIndex, pageSize) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/usermessage'),
      header: {
        Authorization: getToken()
      },
      data: {
        type: 'notify',
        status: status,
        pageIndex: pageIndex,
        pageSize: pageSize
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 消息详情
const messageinfo = (messageId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/messageinfo'),
      header: {
        Authorization: getToken()
      },
      data: {
        type: 'notify',
        id: messageId
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 设置消息已读状态
const readmessage = (messageId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/readmessage'),
      header: {
        Authorization: getToken()
      },
      data: {
        type: 'notify',
        id: messageId
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// sys_resource
// 资源信息查询
const resource = (resIds) => {
  return new Promise((resolve, reject) => {
    if (resIds.length == 0) {
      resolve([])
      return
    }
    wx.request({
      method: 'POST',
      url: server('/api/weapp/resource'),
      header: {
        Authorization: getToken()
      },
      data: {
        ids: resIds
      },
      success (res) {
        var response = res.data
        var list = []
        response.data.forEach(item => {
          list.push(item)
        })
        list.forEach(item => {
          item._url = server('/resource/' + item.folder + '/' + item.storageName)
        })
        resolve(list)
      },
      fail () {
        reject()
      }
    })
  })
}
const resourcemap = (resIds) => {
  return new Promise((resolve, reject) => {
    resource(resIds).then(res => {
      var map = {}
      res.forEach(item => {
        item._url = server('/resource/' + item.folder + '/' + item.storageName)
        map[item.id] = item
      })
      resolve(map)
    })
  })
}
const resourceexist = (resId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/static/media/exist'),
      header: {
        Authorization: getToken()
      },
      data: {
        resourceId: resId
      },
      success (res) {
        var response = res.data
        resolve(response)
      },
      fail () {
        reject()
      }
    })
  })
}
const resourcetempdelete = (resId, resUid) => {
  return new Promise((resolve, reject) => {
    var params = {
        resourceId: resId,
        resourceUid: resUid
    }
    wx.request({
      method: 'GET',
      url: server('/api/static/media/temp/delete'),
      header: {
        Authorization: getToken()
      },
      data: params,
      success (res) {
        var response = res.data
        resolve(response)
      },
      fail () {
        reject()
      }
    })
  })
}

// 加载字典
const loaddictionary = (dictId) => {
  return new Promise((resolve, reject) => {
    var params = {
      site: 'wgxc',
      lang: 'zh_CN',
      dictId: dictId
    }
    wx.request({
      method: 'GET',
      url: server('/api/dict/list'),
      header: {
        Authorization: getToken()
      },
      data: params,
      success (res) {
        var response = res.data
        resolve(response)
      },
      fail () {
        reject()
      }
    })
  })
}

// 订阅消息模版
const template = (key) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/template'),
      header: {
        Authorization: getToken()
      },
      data: {
        key: key
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}
const templatemap = () => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/templatemap'),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}
const templatelist = () => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/templatelist'),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 站点属性
const siteprops = (key) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/siteprops'),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 获取指定类型的地图图层数据
const loadoverlays = (types) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/widgets/load?types=' + types.join(',')),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 根据角色获取河道列表
const rolerivers = () => {
  return new Promise((resolve, reject) => {
    var user = wx.getStorageSync('user')
    var role = user.roles[0]
    wx.request({
      method: 'GET',
      url: server('/api/weapp/rivers?role=' + role),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 根据ID获取河道信息
const riverinfo = (riverId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/riverinfo?riverId=' + riverId),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 河道关联相关单位
const riverorganization = (riverId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/riverorganization?riverId=' + riverId),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 河道关联相关单位
const riverorganization2 = (riverId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/riverorganization2?riverId=' + riverId),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 根据河道ID获取巡查日志
const patrolloggers = (riverId, date) => {
  if (date) {
    return new Promise((resolve, reject) => {
      wx.request({
        method: 'GET',
        url: server('/api/weapp/patrol/loggers?date=' + date),
        header: {
          Authorization: getToken()
        },
        success (res) {
          resolve(res.data)
        },
        fail () {
          reject()
        }
      })
    })
  }
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/patrol/loggers?riverId=' + riverId),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 根据河道ID获取巡查事件
const patrolevents = (riverId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/patrol/events?riverId=' + riverId),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 根据河道ID获取巡查事件
const patroldetail = (patrolId, type) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/patrol/detail?patrolId=' + patrolId + '&type=' + type),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 根据河道ID获取巡查事件
const patroltracks = (patrolId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/patrol/tracks?patrolId=' + patrolId),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 查询巡查数据
const patrolload = (intdate, riverId, userName) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/patrol/patrolload'),
      header: {
        Authorization: getToken()
      },
      data: {
        intdate, riverId, userName
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 巡查日历
const patrolcalendar = (userName, organizationId, startDate, endDate) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/patrol/patrolcalendar'),
      header: {
        Authorization: getToken()
      },
      data: {
        userName, organizationId, startDate, endDate
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 查询临时保存的巡查数据
const temporaryload = (intdate, riverId, userName) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/patrol/temporaryload'),
      header: {
        Authorization: getToken()
      },
      data: {
        intdate, riverId, userName
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 提交临时保存的巡查数据
const temporarycommit = (intdate, riverId, userName) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/patrol/temporarycommit'),
      header: {
        Authorization: getToken()
      },
      data: {
        intdate, riverId, userName
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 临时保存巡查日志
const temporaryreport = (requestBody) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/patrol/temporaryreport'),
      header: {
        Authorization: getToken()
      },
      data: requestBody,
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 清理临时保存巡查日志
const temporaryreportclear = (intdate, riverId, userName) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/patrol/temporaryreportclear'),
      header: {
        Authorization: getToken()
      },
      data: {
        intdate, riverId, userName
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 临时保存巡查轨迹坐标
const temporarytracks = (requestBody) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/patrol/temporarytracks'),
      header: {
        Authorization: getToken()
      },
      data: requestBody,
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 清理临时保存巡查轨迹坐标
const temporarytracksclear = (intdate, riverId, userName) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/patrol/temporarytracksclear'),
      header: {
        Authorization: getToken()
      },
      data: {
        intdate, riverId, userName
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 提交事件处理结果
const submiteventresult = (requestBody) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/patrol/submiteventresult'),
      header: {
        Authorization: getToken()
      },
      data: requestBody,
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 交办单列表
const missionlist = (type, status, pageIndex, pageSize) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/missionlist'),
      header: {
        Authorization: getToken()
      },
      data: {
        type: type,
        status: status,
        pageIndex: pageIndex,
        pageSize: pageSize
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 交办单详情
const missioninfo = (missionId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/missioninfo'),
      header: {
        Authorization: getToken()
      },
      data: {
        missionId: missionId
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 交办单反馈
const missionfeedback = (missionId, feedback) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/mission/feedback'),
      header: {
        Authorization: getToken()
      },
      data: {
        missionId: missionId,
        feedback: feedback
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 交办单结束
const missionfinish = (missionId, outputResult) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/mission/finish'),
      header: {
        Authorization: getToken()
      },
      data: {
        missionId: missionId,
        outputResult: outputResult
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 交办单生成
const missionjbdpdf = (missionId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/export/process'),
      header: {
        Authorization: getToken()
      },
      data: {
        type: 'jbd',
        missionId: missionId
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 工作单列表
const workorderlist = (type, status, pageIndex, pageSize) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/workorderlist'),
      header: {
        Authorization: getToken()
      },
      data: {
        type: type,
        status: status,
        pageIndex: pageIndex,
        pageSize: pageSize
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 工作单详情
const workorderinfo = (workorderId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/workorderinfo'),
      header: {
        Authorization: getToken()
      },
      data: {
        workorderId: workorderId
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 工作单反馈
const workorderfeedback = (workorderId, feedback, feedbackImages) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/workorder/feedback'),
      header: {
        Authorization: getToken()
      },
      data: {
        workorderId: workorderId,
        feedback: feedback,
        feedbackImages: feedbackImages
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 工作单结束
const workorderfinish = (workorderId, outputResult) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/workorder/finish'),
      header: {
        Authorization: getToken()
      },
      data: {
        workorderId: workorderId,
        outputResult: outputResult
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 工作单生成
const workordergzdpdf = (workorderId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/export/process'),
      header: {
        Authorization: getToken()
      },
      data: {
        type: 'gzd',
        workorderId: workorderId
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 养护单位列表
const yhdwlist = (organizationId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/yhdwlist'),
      header: {
        Authorization: getToken()
      },
      data: {
        organizationId
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 养护记录列表
const yhjllist = (organizationId, pageIndex, pageSize) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/yhjllist'),
      header: {
        Authorization: getToken()
      },
      data: {
        organizationId, 
        pageIndex, 
        pageSize
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 养护日历
const maintenancecalendar = (organizationId, startDate, endDate) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/maintenancecalendar'),
      header: {
        Authorization: getToken()
      },
      data: {
        organizationId, startDate, endDate
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 养护轨迹
const maintenancetracks = (date, shipId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/maintenancetracks'),
      header: {
        Authorization: getToken()
      },
      data: {
        date, shipId
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 水质统计（总览）
const waterquality_total = (date, shipId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/waterquality/total'),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 水质统计（街镇总览）
const waterquality_subtotal = (date, shipId) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/waterquality/subtotal'),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 上级单位列表
const superiors = () => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/org/superiors'),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}
// 下级单位列表
const subordinates = () => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/org/subordinates'),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}
// 街镇河长办单位列表
const subordinates_jzhzb = () => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/org/jzhzblist'),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}
// 区级养护单位列表
const subordinates_swglsyhdw = () => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/org/swglsyhdwlist'),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}
// 待办统计
const todocount = () => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/todo/count?type=&toOrganizationId='),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 待办统计
const todolist = () => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'GET',
      url: server('/api/weapp/todo/search?type=&toOrganizationId='),
      header: {
        Authorization: getToken()
      },
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}

// 待办统计（工作单）
const webworkorderlistv2 = (data) => {
  return new Promise((resolve, reject) => {
    wx.request({
      method: 'POST',
      url: server('/api/weapp/workorder/search2'),
      header: {
        Authorization: getToken()
      },
      data: data,
      success (res) {
        resolve(res.data)
      },
      fail () {
        reject()
      }
    })
  })
}



module.exports = {
  server,
  weapp,
  getToken,
  weauth,
  webind,
  weunbind,
  welogin,
  tmplogin,
  repasswd,
  userinfo,
  usercount,
  wgxcuser,
  messagelist,
  messageinfo,
  readmessage,
  resource,
  resourcemap,
  resourceexist,
  resourcetempdelete,
  loaddictionary,
  template,
  templatemap,
  templatelist,
  siteprops,
  loadoverlays,
  rolerivers,
  riverinfo,
  riverorganization,
  riverorganization2,
  patrolloggers,
  patrolevents,
  patroldetail,
  patroltracks,
  patrolload,
  patrolcalendar,
  temporaryload,
  temporarycommit,
  temporaryreport,
  temporaryreportclear,
  temporarytracks,
  temporarytracksclear,
  submiteventresult,
  missionlist,
  missioninfo,
  missionfeedback,
  missionfinish,
  missionjbdpdf,
  workorderlist,
  workorderinfo,
  workorderfeedback,
  workorderfinish,
  workordergzdpdf,
  yhdwlist,
  yhjllist,
  maintenancecalendar,
  maintenancetracks,
  waterquality_total,
  waterquality_subtotal,
  superiors,
  subordinates,
  subordinates_jzhzb,
  subordinates_swglsyhdw,
  todocount,
  todolist,
  webworkorderlistv2
}
